<template>
  <div>
    <OtherPages1
      :yijiList="yijiList"
      :allFenlei="allFenlei"
      :mbName="mbName"
    ></OtherPages1>
  </div>
</template>

<script>
import OtherPages1 from '@/components/OtherPages1.vue'
export default {
  name: 'AboutView1',
  components: {
    OtherPages1,
  },
  data() {
    return {
      yijiList: [],
      allFenlei: [],
      mbName: '',
    }
  },
  watch: {
    $route: {
      async handler(to) {
        //面包屑
        const mbaoName = await to.query.name
        //console.log(mbaoName)
        this.mbName = mbaoName
        // 获取一级菜单数据
        const oneMenu = await this.$zhu.oneMenu({ id: to.query.id })
        this.yijiList = oneMenu.data.result.children
        this.allFenlei = this.yijiList
        //console.log(this.yijiList, this.allFenlei)
      },
      immediate: true,
    },
  },
}
</script>

<style></style>
